<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>厦游网</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<script type="application/x-javascript">addEventListener("load", function() {
		setTimeout(hideURLbar, 0);
	}, false);
	function hideURLbar() {
		window.scrollTo(0, 1);
	}
</script>


<!--flexslider-css-->
<!--bootstrap-->
<link href="css/bootstrap.min.css" rel="stylesheet" type="text/css">
<!--coustom css-->
<link href="css/style.css" rel="stylesheet" type="text/css" />
<!--fonts-->
<script type="text/javascript" src="js/jquery-3.2.1.js"></script>
<link
	href='http://fonts.useso.com/css?family=Open+Sans:400,300,300italic,400italic,800italic,800,700italic,700,600,600italic'
	rel='stylesheet' type='text/css'>
<!--/fonts-->
<!--script-->
<script src="js/jquery.min.js"> </script>
<!-- js -->
<script src="js/bootstrap.js"></script>
<!-- js -->
<!-- js -->
<script type="text/javascript" src="js/move-top.js"></script>
<script type="text/javascript" src="js/easing.js"></script>
<!--/script-->
<script type="text/javascript">
	jQuery(document).ready(function($) {
		$(".scroll").click(function(event) {
			scrollTop : $(this.hash).offset().top
		}, 900);
	});
</script>
<script type="text/javascript">
var i=${index};
//尾页直接给一个最大值首页直接给1传入
var j=99;
var k=1;
/* alert(i); */
function shouA() {
		$.post("ToIndexServet2?op=forum2&judge=1",{index:k+"/sy"},function(obj){		
			$("#neirong").html(obj);
	}) 
}
function weiA() {
		$.post("ToIndexServet2?op=forum2&judge=1",{index:j+"/wy"},function(obj){		
			$("#neirong").html(obj);
	}) 
}
function shangA(i) {	
	//方法必须传值,也就是当前index
	$.post("ToIndexServet2?op=forum2&judge=1",{index:i+"/s"},function(obj){		
		$("#neirong").html(obj);//传本页数字加字母到weiyeServlet判断
}) 
}
function xiaA(i) {
	//方法必须传值,也就是当前index
	 $.post("ToIndexServet2?op=forum2&judge=1",{index:i+"/x"},function(obj){		
		$("#neirong").html(obj);
})  
}
function shouB() {
		$.post("ToIndexServet2?op=forum2&judge=2&id=id",{index:k+"/sy"},function(obj){		
			$("#neirong").html(obj);
	}) 
}
function weiB() {
		$.post("ToIndexServet2?op=forum2&judge=2&id=id",{index:j+"/wy"},function(obj){		
			$("#neirong").html(obj);
	}) 
}
function shangB(i) {	
	//方法必须传值,也就是当前index
	$.post("ToIndexServet2?op=forum2&judge=2&id=id",{index:i+"/s"},function(obj){		
		$("#neirong").html(obj);//传本页数字加字母到weiyeServlet判断
}) 
}
function xiaB(i) {
	//方法必须传值,也就是当前index
	 $.post("ToIndexServet2?op=forum2&judge=2&id=id",{index:i+"/x"},function(obj){		
		$("#neirong").html(obj);
})  
}
function shouC() {
		$.post("ToIndexServet2?op=forum2&judge=0",{index:k+"/sy"},function(obj){		
			$("#neirong").html(obj);
	}) 
}
function weiC() {
		$.post("ToIndexServet2?op=forum2&judge=0",{index:j+"/wy"},function(obj){		
			$("#neirong").html(obj);
	}) 
}
function shangC(i) {	
	//方法必须传值,也就是当前index
	$.post("ToIndexServet2?op=forum2&judge=0",{index:i+"/s"},function(obj){		
		$("#neirong").html(obj);//传本页数字加字母到weiyeServlet判断
}) 
}
function xiaC(i) {
	//方法必须传值,也就是当前index
	 $.post("ToIndexServet2?op=forum2&judge=0",{index:i+"/x"},function(obj){		
		$("#neirong").html(obj);
})  
}
</script>

<!--/script-->
</head>

<body>
	<%@ include file="top.jsp"%>

	<div class="index-abt">
		<div class="container">
			<div class="col-md-3 index-abt1">
				<div class="abt-img">
					<i class="glyphicon glyphicon-euro"> </i>
				</div>
				<h3>scenery</h3>
				</br> <a href='ToIndexServet'>寻找景点</a>
			</div>
			<div class="col-md-3 index-abt1">
				<div class="abt-img">
					<i class="glyphicon glyphicon-share"> </i>
				</div>
				<h3>Strategy</h3>
				</br> <a href='ToQueryArticlesServlet'>攻略查询</a>
			</div>
			<div class="col-md-3 index-abt1">
				<div class="abt-img">
					<i class="glyphicon glyphicon-screenshot"> </i>
				</div>
				<h3>travels</h3>
				</br> <a href='ToAddArticlesServlet'>发表游记</a>
			</div>
			<div class="col-md-3 index-abt1">
				<div class="abt-img">
					<i class="glyphicon glyphicon-btc"> </i>
				</div>
				<h3>own</h3>
				</br> <a href='ToQueryUserArticlesServet'>找到自己</a>
			</div>
		</div>
	</div>
	<div class="index-p" id="">
		<div class="container">
			<div class="col-md-6 green-gird">
				<c:if test="${jurisdiction==1}">
					<img src="ImgshowArticlesServlet?fileName=${art.articleAimgurl}"
						alt="" width="450" height="300" />
				</c:if>
				<c:if test="${jurisdiction==2}">
					<img src="ImgshowArticlesServlet?fileName=${art.articleAimgurl}"
						alt="" width="450" height="300" />
				</c:if>
				<c:if test="${jurisdiction==0}">
					<img src="ImgshowArticlesServlet?fileName=${art.sceneryPhoto}"
						alt="" width="450" height="300" />
				</c:if>
			</div>
			<div class="col-md-6 index-ptext" id="">
				<c:if test="${jurisdiction==2}">
					<h3>${art.articleTitle}</h3>
					<p>${art.userId.userName}</p>
					<p>${art.articleContent}</p>
				</c:if>
				<c:if test="${jurisdiction==1}">
					<h3>${art.articleTitle}</h3>
					<p>${art.userId.userName}</p>
					<p>${art.articleContent}</p>
				</c:if>
				<c:if test="${jurisdiction==0}">
					<h3>${art.sceneryName}</h3>
					<p>${art.sceneryIntroduce}</p>
				</c:if>
			</div>
		</div>
	</div>
	<div class="clearfix"></div>
	<div class="index-works" id="liupian">
		<div class="container">
			<div class="col">
				<div class="col2" id="neirong">
					<c:if test="${jurisdiction==2}">
						<c:forEach items="${articlesList }" var="n" varStatus="status">
							<div class="col-md-4 col1">
								<figure class="effect-bubba"> <img
									class="img-responsive"
									src="ImgshowArticlesServlet?fileName=${n.articleAimgurl}"
									alt="" width="350" height="240" /> <figcaption>
								<h4>${n.articleId }</h4>
								<p>随心看</p>
								</figcaption> </figure>
								<div class="clearfix"></div>
								<div class="effect-gird">
									<h3>
										<a href='ToArticlesInfoServlet?articleId=${n.articleId }'>${n.articleTitle }</a>
									</h3>
									<p>${n.userId.userName}</p>
								</div>
							</div>
						</c:forEach>

					</c:if>
					<c:if test="${jurisdiction==1}">
						<c:forEach items="${articlesList }" var="n" varStatus="status">
							<div class="col-md-4 col1">
								<figure class="effect-bubba"> <img
									class="img-responsive"
									src="ImgshowArticlesServlet?fileName=${n.articleAimgurl}"
									alt="" width="350" height="240" /> <figcaption>
								<h4>${n.articleId }</h4>
								<p>随心看</p>
								</figcaption> </figure>
								<div class="clearfix"></div>
								<div class="effect-gird">
									<h3>
										<a href='ToArticlesInfoServlet?articleId=${n.articleId }'>${n.articleTitle }</a>
									</h3>
									<p>${n.userId.userName}</p>
								</div>
							</div>
						</c:forEach>

					</c:if>
					<c:if test="${jurisdiction==0}">
						<c:forEach items="${articlesList }" var="n" varStatus="status">
							<div class="col-md-4 col1">
								<figure class="effect-bubba"> <img
									class="img-responsive"
									src="ImgshowArticlesServlet?fileName=${n.sceneryPhoto}" alt=""
									width="350" height="240" /> <figcaption>
								<h4>${n.sceneryId }</h4>
								<p>随心看</p>
								</figcaption> </figure>
								<div class="clearfix"></div>
								<div class="effect-gird">
									<h3>
										<a
											href='SelectSceneryServlet?op=select3&sceneryId=${n.sceneryId }'>${n.sceneryName }</a>
									</h3>
								</div>
							</div>
						</c:forEach>

					</c:if>
					<div class="clearfix"></div>
					<c:if test="${jurisdiction==2}">
						<div style="width: 600px;height: 50px; margin: 0 auto ">
							<div style=" margin-left: 130px">
								<input type="button" onclick="shouB()" value="首页"> <input
									type="button" onclick="shangB(${index })" value="上一页">
								<input type="button" onclick="xiaB(${index })" value="下一页">
								<input type="button" onclick="weiB()" value="尾页"> <span>当前页数[${index }]&nbsp;&nbsp;总页数[${pagecount}]</span>
							</div>
						</div>
					</c:if>
					<c:if test="${jurisdiction==1}">
						<div style="width: 600px;height: 50px; margin: 0 auto ">
							<div style=" margin-left: 130px">
								<input type="button" onclick="shouA()" value="首页"> <input
									type="button" onclick="shangA(${index })" value="上一页">
								<input type="button" onclick="xiaA(${index })" value="下一页">
								<input type="button" onclick="weiA()" value="尾页"> <span>当前页数[${index }]&nbsp;&nbsp;总页数[${pagecount}]</span>
							</div>
						</div>
					</c:if>
					<c:if test="${jurisdiction==0}">
						<div style="width: 600px;height: 50px; margin: 0 auto ">
							<div style=" margin-left: 130px">
								<input type="button" onclick="shouC()" value="首页"> <input
									type="button" onclick="shangC(${index })" value="上一页">
								<input type="button" onclick="xiaC(${index })" value="下一页">
								<input type="button" onclick="weiC()" value="尾页"> <span>当前页数[${index }]&nbsp;&nbsp;总页数[${pagecount}]</span>
							</div>
						</div>
					</c:if>
				</div>
			</div>

		</div>

		<script src="js/responsiveslides.min.js"></script>
		<script>
			$(function() {
				$("#slider").responsiveSlides({
					auto : true,
					nav : true,
					speed : 500,
					namespace : "callbacks",
					pager : true,
				});
			});
		</script>
		<%@ include file="buttom.jsp"%>
</body>
</html>
